<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>

<div id="rightPan">
	<div id="rightbodyPan">
		<div align="center"><p style=" font-size: 24px; padding: 10px 0 5px 0;" >สินค้า ประเภทอาหาร</p></div>
		<div id="headerTab">
			<a style="width: 130px;" href="<s:url action="food_get" namespace="/product"/>">เรียกดูข้อมูลทั้งหมด</a>
			<a style="width: 130px;" href="<s:url action="food_toSearch" namespace="/product"/>">ค้นหา/เรียกดู ข้อมูล</a>
			<a style="width: 70px;" id="clicked">เพิ่มข้อมูล</a>
		</div>
		
		<script type="text/javascript">
			function add4(){
				document.getElementById( 'food_add4' ).submit();
			}
			
		</script>
		
		<s:form id="food_added" action="food_added" theme="simple">
		</s:form>
		
		<s:form id="food_add4" action="food_add4" theme="simple">
			<table>
				<tr>
					<td style="padding-top: 20px;" id="slabel">ชื่ออาหาร:</td>
					<td style="padding-top: 20px;"><s:label value="%{#session.FOOD.foodName}"/></td>
				</tr>
				<tr>
					<td id="slabel">ยี่ห้อ:</td>
					<td><s:label value="%{#session.FOOD.foodBrand}"/></td>
				</tr>
				<tr>
					<td id="slabel">รายละเอียด:</td>
					<td><s:label value="%{#session.FOOD.description}"/></td>
				</tr>
				<tr>
					<td id="slabel">ประเภท:</td>
					<td><s:label value="%{#session.FOOD.type}"/></td>
				</tr>
				<tr>
					<td id="slabel">พันธุ์ที่เหมาะสม:</td>
					<td><s:label value="%{#session.FOOD.thaiDogBreedName}"/></td>
				</tr>
				<tr>
					<td id="slabel">ขนาดที่เหมาะสม:</td>
					<td><s:label value="%{#session.FOOD.thaiDogSize}"/></td>
				</tr>
				<tr>
					<td id="slabel">วัยที่เหมาะสม:</td>
					<td><s:label value="%{#session.FOOD.lifeSpan}"/></td>
				<tr>
					<td id="slabel">รสชาติ:</td>
					<td><s:label value="%{#session.FOOD.taste}"/></td>
				</tr>
				<tr>
					<td id="slabel">ปริมาณแคลอรี่:</td>
					<td><s:label value="%{#session.FOOD.kilocalorie}"/>
					  <s:label value="%{#session.FOOD.thaiCalType}"/></td>
				</tr>
			</table>
			ส่วนประกอบที่สำคัญ:<s:label value="%{#session.FOOD.ingredient}"/>
			<br/>
			<s:if test="%{#session.FOOD.beefIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png"/></s:else>เนื้อวัว
			<s:if test="%{#session.FOOD.porkIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>เนื้อหมู
			<s:if test="%{#session.FOOD.chickenIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>เนื้อไก่
			<s:if test="%{#session.FOOD.fishIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>เนื้อปลา
			<s:if test="%{#session.FOOD.milkIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png"/></s:else>นม
			<s:if test="%{#session.FOOD.wheyIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>หางนม
			<s:if test="%{#session.FOOD.eggIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>ไข่
			<s:if test="%{#session.FOOD.soybeanIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>ถั่วเหลือง
			<s:if test="%{#session.FOOD.cornIngredient==1}"><img src="../images/check.png"/></s:if><s:else><img src="../images/uncheck.png" style="padding-left:5px;"/></s:else>ข้าวโพด
		
			<table>
				<s:if test="%{#session.FOOD.foodFTNSubTypeName1!=\"\"}">
					<tr></tr>
					<tr>
						<td><ul style="height: 20px; margin: 0 0 0 40px;">
						<li id="d" style="width:700px;"><s:label value="%{#session.FOOD.foodFTNSubTypeName1}"/></li></ul></td>
					</tr>
				</s:if>
				<s:if test="%{#session.FOOD.foodFTNSubTypeName2!=\"\"}">
					<tr></tr>
					<tr>
						<td><ul style="height: 20px; margin: 0 0 0 40px;">
						<li id="d"><s:label value="%{#session.FOOD.foodFTNSubTypeName2}"/></li></ul></td>
					</tr>
				</s:if>
				<s:if test="%{#session.FOOD.foodFTNSubTypeName3!=\"\"}">
					<tr></tr>
					<tr>
						<td><ul style="height: 20px; margin: 0 0 0 40px;">
						<li id="d"><s:label value="%{#session.FOOD.foodFTNSubTypeName3}"/></li></ul></td>
					</tr>
				</s:if>
				<s:if test="%{#session.FOOD.foodFTNSubTypeName4!=\"\"}">
					<tr></tr>
					<tr>
						<td><ul style="height: 20px; margin: 0 0 0 40px;">
						<li id="d"><s:label value="%{#session.FOOD.foodFTNSubTypeName4}"/></li></ul></td>
					</tr>
				</s:if>
				<s:if test="%{#session.FOOD.foodFTNSubTypeName5!=\"\"}">
					<tr></tr>
					<tr>
						<td><ul style="height: 20px; margin: 0 0 0 40px;">
						<li id="d"><s:label value="%{#session.FOOD.foodFTNSubTypeName5}"/></li></ul></td>
					</tr>
				</s:if>
			</table>
			
			<table>
				<tr>
					<td id="slabel" style="padding: 20px 0 0 20px;">ขนาด1:<span>*</span></td>
					<td style="padding: 20px 0 0 0;"><s:textfield name="food.size1" style=" text-align:right;" size="3"/>
					<s:select list="selectSizeType" key="food.sizeType1" value="%{#session.FOOD.sizeType1}" headerKey="-1" headerValue=""/>
					&nbsp;&nbsp; ราคา<span>*</span><s:textfield name="food.price1" style=" text-align:right;" size="3"/>บาท
					&nbsp;&nbsp; ค่าขนส่ง<s:textfield name="food.delivery1" style=" text-align:right;" size="3"/>บาท</td>
				</tr>
				<s:if test="%{#session.FOOD.calType!='CALORIES_PER_PACKAGE'}">
				<tr>
					<td id="slabel" style="padding: 20px 0 0 0;">ขนาด2:</td>
					<td style="padding: 20px 0 0 0;"><s:textfield name="food.size2" style=" text-align:right;" size="3"/>
					<s:select list="selectSizeType" key="food.sizeType2" value="%{#session.FOOD.sizeType2}" headerKey="-1" headerValue=""/>
					&nbsp;&nbsp; ราคา<s:textfield name="food.price2" style=" text-align:right;" size="3"/>บาท
					&nbsp;&nbsp; ค่าขนส่ง<s:textfield name="food.delivery2" style=" text-align:right;" size="3"/>บาท</td>
				</tr>
				<tr>
					<td id="slabel" style="padding: 20px 0 0 0;">ขนาด3:</td>
					<td style="padding: 20px 0 0 0;"><s:textfield name="food.size3" style=" text-align:right;" size="3"/>
					<s:select list="selectSizeType" key="food.sizeType3" value="%{#session.FOOD.sizeType3}" headerKey="-1" headerValue=""/>
					&nbsp;&nbsp; ราคา<s:textfield name="food.price3" style=" text-align:right;" size="3"/>บาท
					&nbsp;&nbsp; ค่าขนส่ง<s:textfield name="food.delivery3" style=" text-align:right;" size="3"/>บาท</td>
				</tr>
				<tr>
					<td id="slabel" style="padding: 20px 0 0 0;">ขนาด4:</td>
					<td style="padding: 20px 0 0 0;"><s:textfield name="food.size4" style=" text-align:right;" size="3"/>
					<s:select list="selectSizeType" key="food.sizeType4" value="%{#session.FOOD.sizeType4}" headerKey="-1" headerValue=""/>
					&nbsp;&nbsp; ราคา<s:textfield name="food.price4" style=" text-align:right;" size="3"/>บาท
					&nbsp;&nbsp; ค่าขนส่ง<s:textfield name="food.delivery4" style=" text-align:right;" size="3"/>บาท</td>
				</tr>
				<tr>
					<td id="slabel" style="padding: 20px 0 0 0;">ขนาด5:</td>
					<td style="padding: 20px 0 0 0;"><s:textfield name="food.size5" style=" text-align:right;" size="3"/>
					<s:select list="selectSizeType" key="food.sizeType5" value="%{#session.FOOD.sizeType5}" headerKey="-1" headerValue=""/>
					&nbsp;&nbsp; ราคา<s:textfield name="food.price5" style=" text-align:right;" size="3"/>บาท
					&nbsp;&nbsp; ค่าขนส่ง<s:textfield name="food.delivery5" style=" text-align:right;" size="3"/>บาท</td>
				</tr>
				</s:if>
			</table>
			
			<div align="center" style=" padding-top: 40px;">
			<input onclick="add4()" type="button" value="เพิ่มข้อมูลขนาดและราคา >>" id="button" style="width:210px;"></input>
			</div>
			
		</s:form>
		
	</div>
</div>